﻿
#region Using directives

using System;
using System.Collections;
using System.Collections.Specialized;


using System.Web.Configuration;
using System.Data;
using System.Data.Common;
using System.Configuration.Provider;

using Microsoft.Practices.EnterpriseLibrary.Data;
using Microsoft.Practices.EnterpriseLibrary.Data.Sql;

using PAT.Entities;
using PAT.Data;
using PAT.Data.Bases;

#endregion

namespace PAT.Data.SqlClient
{
	/// <summary>
	/// This class is the Sql implementation of the NetTiersProvider.
	/// </summary>
	public sealed class SqlNetTiersProvider : PAT.Data.Bases.NetTiersProvider
	{
		private static object syncRoot = new Object();
		private string _applicationName;
        private string _connectionString;
        private bool _useStoredProcedure;
        string _providerInvariantName;
		
		/// <summary>
		/// Initializes a new instance of the <see cref="SqlNetTiersProvider"/> class.
		///</summary>
		public SqlNetTiersProvider()
		{	
		}		
		
		/// <summary>
        /// Initializes the provider.
        /// </summary>
        /// <param name="name">The friendly name of the provider.</param>
        /// <param name="config">A collection of the name/value pairs representing the provider-specific attributes specified in the configuration for this provider.</param>
        /// <exception cref="T:System.ArgumentNullException">The name of the provider is null.</exception>
        /// <exception cref="T:System.InvalidOperationException">An attempt is made to call <see cref="M:System.Configuration.Provider.ProviderBase.Initialize(System.String,System.Collections.Specialized.NameValueCollection)"></see> on a provider after the provider has already been initialized.</exception>
        /// <exception cref="T:System.ArgumentException">The name of the provider has a length of zero.</exception>
		public override void Initialize(string name, NameValueCollection config)
        {
            // Verify that config isn't null
            if (config == null)
            {
                throw new ArgumentNullException("config");
            }

            // Assign the provider a default name if it doesn't have one
            if (String.IsNullOrEmpty(name))
            {
                name = "SqlNetTiersProvider";
            }

            // Add a default "description" attribute to config if the
            // attribute doesn't exist or is empty
            if (string.IsNullOrEmpty(config["description"]))
            {
                config.Remove("description");
                config.Add("description", "NetTiers Sql provider");
            }

            // Call the base class's Initialize method
            base.Initialize(name, config);

            // Initialize _applicationName
            _applicationName = config["applicationName"];

            if (string.IsNullOrEmpty(_applicationName))
            {
                _applicationName = "/";
            }
            config.Remove("applicationName");


            #region "Initialize UseStoredProcedure"
            string storedProcedure  = config["useStoredProcedure"];
           	if (string.IsNullOrEmpty(storedProcedure))
            {
                throw new ProviderException("Empty or missing useStoredProcedure");
            }
            this._useStoredProcedure = Convert.ToBoolean(config["useStoredProcedure"]);
            config.Remove("useStoredProcedure");
            #endregion

			#region ConnectionString

			// Initialize _connectionString
			_connectionString = config["connectionString"];
			config.Remove("connectionString");

			string connect = config["connectionStringName"];
			config.Remove("connectionStringName");

			if ( String.IsNullOrEmpty(_connectionString) )
			{
				if ( String.IsNullOrEmpty(connect) )
				{
					throw new ProviderException("Empty or missing connectionStringName");
				}

				if ( DataRepository.ConnectionStrings[connect] == null )
				{
					throw new ProviderException("Missing connection string");
				}

				_connectionString = DataRepository.ConnectionStrings[connect].ConnectionString;
			}

            if ( String.IsNullOrEmpty(_connectionString) )
            {
                throw new ProviderException("Empty connection string");
			}

			#endregion
            
             #region "_providerInvariantName"

            // initialize _providerInvariantName
            this._providerInvariantName = config["providerInvariantName"];

            if (String.IsNullOrEmpty(_providerInvariantName))
            {
                throw new ProviderException("Empty or missing providerInvariantName");
            }
            config.Remove("providerInvariantName");

            #endregion

        }
		
		/// <summary>
		/// Creates a new <c cref="TransactionManager"/> instance from the current datasource.
		/// </summary>
		/// <returns></returns>
		public override TransactionManager CreateTransaction()
		{
			return new TransactionManager(this._connectionString);
		}
		
		/// <summary>
		/// Gets a value indicating whether to use stored procedure or not.
		/// </summary>
		/// <value>
		/// 	<c>true</c> if this repository use stored procedures; otherwise, <c>false</c>.
		/// </value>
		public bool UseStoredProcedure
		{
			get {return this._useStoredProcedure;}
			set {this._useStoredProcedure = value;}
		}
		
		 /// <summary>
        /// Gets or sets the connection string.
        /// </summary>
        /// <value>The connection string.</value>
		public string ConnectionString
		{
			get {return this._connectionString;}
			set {this._connectionString = value;}
		}
		
		/// <summary>
	    /// Gets or sets the invariant provider name listed in the DbProviderFactories machine.config section.
	    /// </summary>
	    /// <value>The name of the provider invariant.</value>
	    public string ProviderInvariantName
	    {
	        get { return this._providerInvariantName; }
	        set { this._providerInvariantName = value; }
	    }		
		
		///<summary>
		/// Indicates if the current <c cref="NetTiersProvider"/> implementation supports Transacton.
		///</summary>
		public override bool IsTransactionSupported
		{
			get
			{
				return true;
			}
		}

		
		#region "PatRolProvider"
			
		private SqlPatRolProvider innerSqlPatRolProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatRol"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatRolProviderBase PatRolProvider
		{
			get
			{
				if (innerSqlPatRolProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatRolProvider == null)
						{
							this.innerSqlPatRolProvider = new SqlPatRolProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatRolProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatRolProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatRolProvider SqlPatRolProvider
		{
			get {return PatRolProvider as SqlPatRolProvider;}
		}
		
		#endregion
		
		
		#region "PatTipoUbicacionGeograficaProvider"
			
		private SqlPatTipoUbicacionGeograficaProvider innerSqlPatTipoUbicacionGeograficaProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatTipoUbicacionGeografica"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatTipoUbicacionGeograficaProviderBase PatTipoUbicacionGeograficaProvider
		{
			get
			{
				if (innerSqlPatTipoUbicacionGeograficaProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatTipoUbicacionGeograficaProvider == null)
						{
							this.innerSqlPatTipoUbicacionGeograficaProvider = new SqlPatTipoUbicacionGeograficaProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatTipoUbicacionGeograficaProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatTipoUbicacionGeograficaProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatTipoUbicacionGeograficaProvider SqlPatTipoUbicacionGeograficaProvider
		{
			get {return PatTipoUbicacionGeograficaProvider as SqlPatTipoUbicacionGeograficaProvider;}
		}
		
		#endregion
		
		
		#region "PatGrupoCatalogoProvider"
			
		private SqlPatGrupoCatalogoProvider innerSqlPatGrupoCatalogoProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatGrupoCatalogo"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatGrupoCatalogoProviderBase PatGrupoCatalogoProvider
		{
			get
			{
				if (innerSqlPatGrupoCatalogoProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatGrupoCatalogoProvider == null)
						{
							this.innerSqlPatGrupoCatalogoProvider = new SqlPatGrupoCatalogoProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatGrupoCatalogoProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatGrupoCatalogoProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatGrupoCatalogoProvider SqlPatGrupoCatalogoProvider
		{
			get {return PatGrupoCatalogoProvider as SqlPatGrupoCatalogoProvider;}
		}
		
		#endregion
		
		
		#region "PatAccesorioProvider"
			
		private SqlPatAccesorioProvider innerSqlPatAccesorioProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatAccesorio"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatAccesorioProviderBase PatAccesorioProvider
		{
			get
			{
				if (innerSqlPatAccesorioProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatAccesorioProvider == null)
						{
							this.innerSqlPatAccesorioProvider = new SqlPatAccesorioProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatAccesorioProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatAccesorioProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatAccesorioProvider SqlPatAccesorioProvider
		{
			get {return PatAccesorioProvider as SqlPatAccesorioProvider;}
		}
		
		#endregion
		
		
		#region "PatRolMenuProvider"
			
		private SqlPatRolMenuProvider innerSqlPatRolMenuProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatRolMenu"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatRolMenuProviderBase PatRolMenuProvider
		{
			get
			{
				if (innerSqlPatRolMenuProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatRolMenuProvider == null)
						{
							this.innerSqlPatRolMenuProvider = new SqlPatRolMenuProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatRolMenuProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatRolMenuProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatRolMenuProvider SqlPatRolMenuProvider
		{
			get {return PatRolMenuProvider as SqlPatRolMenuProvider;}
		}
		
		#endregion
		
		
		#region "PatTemparioProvider"
			
		private SqlPatTemparioProvider innerSqlPatTemparioProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatTempario"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatTemparioProviderBase PatTemparioProvider
		{
			get
			{
				if (innerSqlPatTemparioProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatTemparioProvider == null)
						{
							this.innerSqlPatTemparioProvider = new SqlPatTemparioProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatTemparioProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatTemparioProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatTemparioProvider SqlPatTemparioProvider
		{
			get {return PatTemparioProvider as SqlPatTemparioProvider;}
		}
		
		#endregion
		
		
		#region "PatUbicacionGeograficaProvider"
			
		private SqlPatUbicacionGeograficaProvider innerSqlPatUbicacionGeograficaProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatUbicacionGeografica"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatUbicacionGeograficaProviderBase PatUbicacionGeograficaProvider
		{
			get
			{
				if (innerSqlPatUbicacionGeograficaProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatUbicacionGeograficaProvider == null)
						{
							this.innerSqlPatUbicacionGeograficaProvider = new SqlPatUbicacionGeograficaProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatUbicacionGeograficaProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatUbicacionGeograficaProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatUbicacionGeograficaProvider SqlPatUbicacionGeograficaProvider
		{
			get {return PatUbicacionGeograficaProvider as SqlPatUbicacionGeograficaProvider;}
		}
		
		#endregion
		
		
		#region "PatTallerProvider"
			
		private SqlPatTallerProvider innerSqlPatTallerProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatTaller"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatTallerProviderBase PatTallerProvider
		{
			get
			{
				if (innerSqlPatTallerProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatTallerProvider == null)
						{
							this.innerSqlPatTallerProvider = new SqlPatTallerProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatTallerProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatTallerProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatTallerProvider SqlPatTallerProvider
		{
			get {return PatTallerProvider as SqlPatTallerProvider;}
		}
		
		#endregion
		
		
		#region "PatTiempoTallerProvider"
			
		private SqlPatTiempoTallerProvider innerSqlPatTiempoTallerProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatTiempoTaller"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatTiempoTallerProviderBase PatTiempoTallerProvider
		{
			get
			{
				if (innerSqlPatTiempoTallerProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatTiempoTallerProvider == null)
						{
							this.innerSqlPatTiempoTallerProvider = new SqlPatTiempoTallerProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatTiempoTallerProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatTiempoTallerProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatTiempoTallerProvider SqlPatTiempoTallerProvider
		{
			get {return PatTiempoTallerProvider as SqlPatTiempoTallerProvider;}
		}
		
		#endregion
		
		
		#region "PatRegimenTributarioProvider"
			
		private SqlPatRegimenTributarioProvider innerSqlPatRegimenTributarioProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatRegimenTributario"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatRegimenTributarioProviderBase PatRegimenTributarioProvider
		{
			get
			{
				if (innerSqlPatRegimenTributarioProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatRegimenTributarioProvider == null)
						{
							this.innerSqlPatRegimenTributarioProvider = new SqlPatRegimenTributarioProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatRegimenTributarioProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatRegimenTributarioProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatRegimenTributarioProvider SqlPatRegimenTributarioProvider
		{
			get {return PatRegimenTributarioProvider as SqlPatRegimenTributarioProvider;}
		}
		
		#endregion
		
		
		#region "PatNaturalezaDocumentoIdentificacionProvider"
			
		private SqlPatNaturalezaDocumentoIdentificacionProvider innerSqlPatNaturalezaDocumentoIdentificacionProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatNaturalezaDocumentoIdentificacion"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatNaturalezaDocumentoIdentificacionProviderBase PatNaturalezaDocumentoIdentificacionProvider
		{
			get
			{
				if (innerSqlPatNaturalezaDocumentoIdentificacionProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatNaturalezaDocumentoIdentificacionProvider == null)
						{
							this.innerSqlPatNaturalezaDocumentoIdentificacionProvider = new SqlPatNaturalezaDocumentoIdentificacionProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatNaturalezaDocumentoIdentificacionProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatNaturalezaDocumentoIdentificacionProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatNaturalezaDocumentoIdentificacionProvider SqlPatNaturalezaDocumentoIdentificacionProvider
		{
			get {return PatNaturalezaDocumentoIdentificacionProvider as SqlPatNaturalezaDocumentoIdentificacionProvider;}
		}
		
		#endregion
		
		
		#region "PatListaPreciosTallerProvider"
			
		private SqlPatListaPreciosTallerProvider innerSqlPatListaPreciosTallerProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatListaPreciosTaller"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatListaPreciosTallerProviderBase PatListaPreciosTallerProvider
		{
			get
			{
				if (innerSqlPatListaPreciosTallerProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatListaPreciosTallerProvider == null)
						{
							this.innerSqlPatListaPreciosTallerProvider = new SqlPatListaPreciosTallerProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatListaPreciosTallerProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatListaPreciosTallerProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatListaPreciosTallerProvider SqlPatListaPreciosTallerProvider
		{
			get {return PatListaPreciosTallerProvider as SqlPatListaPreciosTallerProvider;}
		}
		
		#endregion
		
		
		#region "PatNivelCombustibleProvider"
			
		private SqlPatNivelCombustibleProvider innerSqlPatNivelCombustibleProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatNivelCombustible"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatNivelCombustibleProviderBase PatNivelCombustibleProvider
		{
			get
			{
				if (innerSqlPatNivelCombustibleProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatNivelCombustibleProvider == null)
						{
							this.innerSqlPatNivelCombustibleProvider = new SqlPatNivelCombustibleProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatNivelCombustibleProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatNivelCombustibleProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatNivelCombustibleProvider SqlPatNivelCombustibleProvider
		{
			get {return PatNivelCombustibleProvider as SqlPatNivelCombustibleProvider;}
		}
		
		#endregion
		
		
		#region "PatOperacionTallerProvider"
			
		private SqlPatOperacionTallerProvider innerSqlPatOperacionTallerProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatOperacionTaller"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatOperacionTallerProviderBase PatOperacionTallerProvider
		{
			get
			{
				if (innerSqlPatOperacionTallerProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatOperacionTallerProvider == null)
						{
							this.innerSqlPatOperacionTallerProvider = new SqlPatOperacionTallerProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatOperacionTallerProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatOperacionTallerProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatOperacionTallerProvider SqlPatOperacionTallerProvider
		{
			get {return PatOperacionTallerProvider as SqlPatOperacionTallerProvider;}
		}
		
		#endregion
		
		
		#region "PatKitProvider"
			
		private SqlPatKitProvider innerSqlPatKitProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatKit"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatKitProviderBase PatKitProvider
		{
			get
			{
				if (innerSqlPatKitProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatKitProvider == null)
						{
							this.innerSqlPatKitProvider = new SqlPatKitProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatKitProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatKitProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatKitProvider SqlPatKitProvider
		{
			get {return PatKitProvider as SqlPatKitProvider;}
		}
		
		#endregion
		
		
		#region "PatTipoCombustibleProvider"
			
		private SqlPatTipoCombustibleProvider innerSqlPatTipoCombustibleProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatTipoCombustible"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatTipoCombustibleProviderBase PatTipoCombustibleProvider
		{
			get
			{
				if (innerSqlPatTipoCombustibleProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatTipoCombustibleProvider == null)
						{
							this.innerSqlPatTipoCombustibleProvider = new SqlPatTipoCombustibleProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatTipoCombustibleProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatTipoCombustibleProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatTipoCombustibleProvider SqlPatTipoCombustibleProvider
		{
			get {return PatTipoCombustibleProvider as SqlPatTipoCombustibleProvider;}
		}
		
		#endregion
		
		
		#region "PatValorOrdenProvider"
			
		private SqlPatValorOrdenProvider innerSqlPatValorOrdenProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatValorOrden"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatValorOrdenProviderBase PatValorOrdenProvider
		{
			get
			{
				if (innerSqlPatValorOrdenProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatValorOrdenProvider == null)
						{
							this.innerSqlPatValorOrdenProvider = new SqlPatValorOrdenProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatValorOrdenProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatValorOrdenProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatValorOrdenProvider SqlPatValorOrdenProvider
		{
			get {return PatValorOrdenProvider as SqlPatValorOrdenProvider;}
		}
		
		#endregion
		
		
		#region "PatTrabajoOrdenProvider"
			
		private SqlPatTrabajoOrdenProvider innerSqlPatTrabajoOrdenProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatTrabajoOrden"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatTrabajoOrdenProviderBase PatTrabajoOrdenProvider
		{
			get
			{
				if (innerSqlPatTrabajoOrdenProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatTrabajoOrdenProvider == null)
						{
							this.innerSqlPatTrabajoOrdenProvider = new SqlPatTrabajoOrdenProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatTrabajoOrdenProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatTrabajoOrdenProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatTrabajoOrdenProvider SqlPatTrabajoOrdenProvider
		{
			get {return PatTrabajoOrdenProvider as SqlPatTrabajoOrdenProvider;}
		}
		
		#endregion
		
		
		#region "PatTipoDocumentoProvider"
			
		private SqlPatTipoDocumentoProvider innerSqlPatTipoDocumentoProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatTipoDocumento"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatTipoDocumentoProviderBase PatTipoDocumentoProvider
		{
			get
			{
				if (innerSqlPatTipoDocumentoProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatTipoDocumentoProvider == null)
						{
							this.innerSqlPatTipoDocumentoProvider = new SqlPatTipoDocumentoProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatTipoDocumentoProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatTipoDocumentoProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatTipoDocumentoProvider SqlPatTipoDocumentoProvider
		{
			get {return PatTipoDocumentoProvider as SqlPatTipoDocumentoProvider;}
		}
		
		#endregion
		
		
		#region "PatUsuarioProvider"
			
		private SqlPatUsuarioProvider innerSqlPatUsuarioProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatUsuario"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatUsuarioProviderBase PatUsuarioProvider
		{
			get
			{
				if (innerSqlPatUsuarioProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatUsuarioProvider == null)
						{
							this.innerSqlPatUsuarioProvider = new SqlPatUsuarioProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatUsuarioProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatUsuarioProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatUsuarioProvider SqlPatUsuarioProvider
		{
			get {return PatUsuarioProvider as SqlPatUsuarioProvider;}
		}
		
		#endregion
		
		
		#region "PatUsuarioRolProvider"
			
		private SqlPatUsuarioRolProvider innerSqlPatUsuarioRolProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatUsuarioRol"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatUsuarioRolProviderBase PatUsuarioRolProvider
		{
			get
			{
				if (innerSqlPatUsuarioRolProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatUsuarioRolProvider == null)
						{
							this.innerSqlPatUsuarioRolProvider = new SqlPatUsuarioRolProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatUsuarioRolProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatUsuarioRolProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatUsuarioRolProvider SqlPatUsuarioRolProvider
		{
			get {return PatUsuarioRolProvider as SqlPatUsuarioRolProvider;}
		}
		
		#endregion
		
		
		#region "PatTipoServicioProvider"
			
		private SqlPatTipoServicioProvider innerSqlPatTipoServicioProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatTipoServicio"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatTipoServicioProviderBase PatTipoServicioProvider
		{
			get
			{
				if (innerSqlPatTipoServicioProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatTipoServicioProvider == null)
						{
							this.innerSqlPatTipoServicioProvider = new SqlPatTipoServicioProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatTipoServicioProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatTipoServicioProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatTipoServicioProvider SqlPatTipoServicioProvider
		{
			get {return PatTipoServicioProvider as SqlPatTipoServicioProvider;}
		}
		
		#endregion
		
		
		#region "PatTipoPropietarioProvider"
			
		private SqlPatTipoPropietarioProvider innerSqlPatTipoPropietarioProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatTipoPropietario"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatTipoPropietarioProviderBase PatTipoPropietarioProvider
		{
			get
			{
				if (innerSqlPatTipoPropietarioProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatTipoPropietarioProvider == null)
						{
							this.innerSqlPatTipoPropietarioProvider = new SqlPatTipoPropietarioProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatTipoPropietarioProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatTipoPropietarioProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatTipoPropietarioProvider SqlPatTipoPropietarioProvider
		{
			get {return PatTipoPropietarioProvider as SqlPatTipoPropietarioProvider;}
		}
		
		#endregion
		
		
		#region "PatTransferenciaProvider"
			
		private SqlPatTransferenciaProvider innerSqlPatTransferenciaProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatTransferencia"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatTransferenciaProviderBase PatTransferenciaProvider
		{
			get
			{
				if (innerSqlPatTransferenciaProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatTransferenciaProvider == null)
						{
							this.innerSqlPatTransferenciaProvider = new SqlPatTransferenciaProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatTransferenciaProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatTransferenciaProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatTransferenciaProvider SqlPatTransferenciaProvider
		{
			get {return PatTransferenciaProvider as SqlPatTransferenciaProvider;}
		}
		
		#endregion
		
		
		#region "PatTipoIdentificacionProvider"
			
		private SqlPatTipoIdentificacionProvider innerSqlPatTipoIdentificacionProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatTipoIdentificacion"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatTipoIdentificacionProviderBase PatTipoIdentificacionProvider
		{
			get
			{
				if (innerSqlPatTipoIdentificacionProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatTipoIdentificacionProvider == null)
						{
							this.innerSqlPatTipoIdentificacionProvider = new SqlPatTipoIdentificacionProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatTipoIdentificacionProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatTipoIdentificacionProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatTipoIdentificacionProvider SqlPatTipoIdentificacionProvider
		{
			get {return PatTipoIdentificacionProvider as SqlPatTipoIdentificacionProvider;}
		}
		
		#endregion
		
		
		#region "PatTipoLiquidacionTallerProvider"
			
		private SqlPatTipoLiquidacionTallerProvider innerSqlPatTipoLiquidacionTallerProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatTipoLiquidacionTaller"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatTipoLiquidacionTallerProviderBase PatTipoLiquidacionTallerProvider
		{
			get
			{
				if (innerSqlPatTipoLiquidacionTallerProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatTipoLiquidacionTallerProvider == null)
						{
							this.innerSqlPatTipoLiquidacionTallerProvider = new SqlPatTipoLiquidacionTallerProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatTipoLiquidacionTallerProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatTipoLiquidacionTallerProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatTipoLiquidacionTallerProvider SqlPatTipoLiquidacionTallerProvider
		{
			get {return PatTipoLiquidacionTallerProvider as SqlPatTipoLiquidacionTallerProvider;}
		}
		
		#endregion
		
		
		#region "PatTransferenciaDetalleProvider"
			
		private SqlPatTransferenciaDetalleProvider innerSqlPatTransferenciaDetalleProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatTransferenciaDetalle"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatTransferenciaDetalleProviderBase PatTransferenciaDetalleProvider
		{
			get
			{
				if (innerSqlPatTransferenciaDetalleProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatTransferenciaDetalleProvider == null)
						{
							this.innerSqlPatTransferenciaDetalleProvider = new SqlPatTransferenciaDetalleProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatTransferenciaDetalleProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatTransferenciaDetalleProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatTransferenciaDetalleProvider SqlPatTransferenciaDetalleProvider
		{
			get {return PatTransferenciaDetalleProvider as SqlPatTransferenciaDetalleProvider;}
		}
		
		#endregion
		
		
		#region "PatTipoEmpleadoProvider"
			
		private SqlPatTipoEmpleadoProvider innerSqlPatTipoEmpleadoProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatTipoEmpleado"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatTipoEmpleadoProviderBase PatTipoEmpleadoProvider
		{
			get
			{
				if (innerSqlPatTipoEmpleadoProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatTipoEmpleadoProvider == null)
						{
							this.innerSqlPatTipoEmpleadoProvider = new SqlPatTipoEmpleadoProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatTipoEmpleadoProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatTipoEmpleadoProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatTipoEmpleadoProvider SqlPatTipoEmpleadoProvider
		{
			get {return PatTipoEmpleadoProvider as SqlPatTipoEmpleadoProvider;}
		}
		
		#endregion
		
		
		#region "PatTipoOperacionTallerProvider"
			
		private SqlPatTipoOperacionTallerProvider innerSqlPatTipoOperacionTallerProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatTipoOperacionTaller"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatTipoOperacionTallerProviderBase PatTipoOperacionTallerProvider
		{
			get
			{
				if (innerSqlPatTipoOperacionTallerProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatTipoOperacionTallerProvider == null)
						{
							this.innerSqlPatTipoOperacionTallerProvider = new SqlPatTipoOperacionTallerProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatTipoOperacionTallerProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatTipoOperacionTallerProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatTipoOperacionTallerProvider SqlPatTipoOperacionTallerProvider
		{
			get {return PatTipoOperacionTallerProvider as SqlPatTipoOperacionTallerProvider;}
		}
		
		#endregion
		
		
		#region "PatOrdenTrabajoGarantiaProvider"
			
		private SqlPatOrdenTrabajoGarantiaProvider innerSqlPatOrdenTrabajoGarantiaProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatOrdenTrabajoGarantia"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatOrdenTrabajoGarantiaProviderBase PatOrdenTrabajoGarantiaProvider
		{
			get
			{
				if (innerSqlPatOrdenTrabajoGarantiaProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatOrdenTrabajoGarantiaProvider == null)
						{
							this.innerSqlPatOrdenTrabajoGarantiaProvider = new SqlPatOrdenTrabajoGarantiaProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatOrdenTrabajoGarantiaProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatOrdenTrabajoGarantiaProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatOrdenTrabajoGarantiaProvider SqlPatOrdenTrabajoGarantiaProvider
		{
			get {return PatOrdenTrabajoGarantiaProvider as SqlPatOrdenTrabajoGarantiaProvider;}
		}
		
		#endregion
		
		
		#region "PatMenuProvider"
			
		private SqlPatMenuProvider innerSqlPatMenuProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatMenu"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatMenuProviderBase PatMenuProvider
		{
			get
			{
				if (innerSqlPatMenuProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatMenuProvider == null)
						{
							this.innerSqlPatMenuProvider = new SqlPatMenuProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatMenuProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatMenuProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatMenuProvider SqlPatMenuProvider
		{
			get {return PatMenuProvider as SqlPatMenuProvider;}
		}
		
		#endregion
		
		
		#region "PatOrdenTrabajoProvider"
			
		private SqlPatOrdenTrabajoProvider innerSqlPatOrdenTrabajoProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatOrdenTrabajo"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatOrdenTrabajoProviderBase PatOrdenTrabajoProvider
		{
			get
			{
				if (innerSqlPatOrdenTrabajoProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatOrdenTrabajoProvider == null)
						{
							this.innerSqlPatOrdenTrabajoProvider = new SqlPatOrdenTrabajoProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatOrdenTrabajoProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatOrdenTrabajoProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatOrdenTrabajoProvider SqlPatOrdenTrabajoProvider
		{
			get {return PatOrdenTrabajoProvider as SqlPatOrdenTrabajoProvider;}
		}
		
		#endregion
		
		
		#region "PatOrdenTrabajoOperacionProvider"
			
		private SqlPatOrdenTrabajoOperacionProvider innerSqlPatOrdenTrabajoOperacionProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatOrdenTrabajoOperacion"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatOrdenTrabajoOperacionProviderBase PatOrdenTrabajoOperacionProvider
		{
			get
			{
				if (innerSqlPatOrdenTrabajoOperacionProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatOrdenTrabajoOperacionProvider == null)
						{
							this.innerSqlPatOrdenTrabajoOperacionProvider = new SqlPatOrdenTrabajoOperacionProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatOrdenTrabajoOperacionProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatOrdenTrabajoOperacionProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatOrdenTrabajoOperacionProvider SqlPatOrdenTrabajoOperacionProvider
		{
			get {return PatOrdenTrabajoOperacionProvider as SqlPatOrdenTrabajoOperacionProvider;}
		}
		
		#endregion
		
		
		#region "PatOrdenTrabajoAccesorioProvider"
			
		private SqlPatOrdenTrabajoAccesorioProvider innerSqlPatOrdenTrabajoAccesorioProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatOrdenTrabajoAccesorio"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatOrdenTrabajoAccesorioProviderBase PatOrdenTrabajoAccesorioProvider
		{
			get
			{
				if (innerSqlPatOrdenTrabajoAccesorioProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatOrdenTrabajoAccesorioProvider == null)
						{
							this.innerSqlPatOrdenTrabajoAccesorioProvider = new SqlPatOrdenTrabajoAccesorioProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatOrdenTrabajoAccesorioProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatOrdenTrabajoAccesorioProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatOrdenTrabajoAccesorioProvider SqlPatOrdenTrabajoAccesorioProvider
		{
			get {return PatOrdenTrabajoAccesorioProvider as SqlPatOrdenTrabajoAccesorioProvider;}
		}
		
		#endregion
		
		
		#region "PatOrdenTrabajoSegurosProvider"
			
		private SqlPatOrdenTrabajoSegurosProvider innerSqlPatOrdenTrabajoSegurosProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatOrdenTrabajoSeguros"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatOrdenTrabajoSegurosProviderBase PatOrdenTrabajoSegurosProvider
		{
			get
			{
				if (innerSqlPatOrdenTrabajoSegurosProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatOrdenTrabajoSegurosProvider == null)
						{
							this.innerSqlPatOrdenTrabajoSegurosProvider = new SqlPatOrdenTrabajoSegurosProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatOrdenTrabajoSegurosProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatOrdenTrabajoSegurosProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatOrdenTrabajoSegurosProvider SqlPatOrdenTrabajoSegurosProvider
		{
			get {return PatOrdenTrabajoSegurosProvider as SqlPatOrdenTrabajoSegurosProvider;}
		}
		
		#endregion
		
		
		#region "PatOrdenTrabajoPeritajeProvider"
			
		private SqlPatOrdenTrabajoPeritajeProvider innerSqlPatOrdenTrabajoPeritajeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatOrdenTrabajoPeritaje"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatOrdenTrabajoPeritajeProviderBase PatOrdenTrabajoPeritajeProvider
		{
			get
			{
				if (innerSqlPatOrdenTrabajoPeritajeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatOrdenTrabajoPeritajeProvider == null)
						{
							this.innerSqlPatOrdenTrabajoPeritajeProvider = new SqlPatOrdenTrabajoPeritajeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatOrdenTrabajoPeritajeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatOrdenTrabajoPeritajeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatOrdenTrabajoPeritajeProvider SqlPatOrdenTrabajoPeritajeProvider
		{
			get {return PatOrdenTrabajoPeritajeProvider as SqlPatOrdenTrabajoPeritajeProvider;}
		}
		
		#endregion
		
		
		#region "PatOrdenTrabajoKitProvider"
			
		private SqlPatOrdenTrabajoKitProvider innerSqlPatOrdenTrabajoKitProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatOrdenTrabajoKit"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatOrdenTrabajoKitProviderBase PatOrdenTrabajoKitProvider
		{
			get
			{
				if (innerSqlPatOrdenTrabajoKitProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatOrdenTrabajoKitProvider == null)
						{
							this.innerSqlPatOrdenTrabajoKitProvider = new SqlPatOrdenTrabajoKitProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatOrdenTrabajoKitProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatOrdenTrabajoKitProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatOrdenTrabajoKitProvider SqlPatOrdenTrabajoKitProvider
		{
			get {return PatOrdenTrabajoKitProvider as SqlPatOrdenTrabajoKitProvider;}
		}
		
		#endregion
		
		
		#region "PatOrdenTrabajoOperacionObservacionProvider"
			
		private SqlPatOrdenTrabajoOperacionObservacionProvider innerSqlPatOrdenTrabajoOperacionObservacionProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatOrdenTrabajoOperacionObservacion"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatOrdenTrabajoOperacionObservacionProviderBase PatOrdenTrabajoOperacionObservacionProvider
		{
			get
			{
				if (innerSqlPatOrdenTrabajoOperacionObservacionProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatOrdenTrabajoOperacionObservacionProvider == null)
						{
							this.innerSqlPatOrdenTrabajoOperacionObservacionProvider = new SqlPatOrdenTrabajoOperacionObservacionProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatOrdenTrabajoOperacionObservacionProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatOrdenTrabajoOperacionObservacionProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatOrdenTrabajoOperacionObservacionProvider SqlPatOrdenTrabajoOperacionObservacionProvider
		{
			get {return PatOrdenTrabajoOperacionObservacionProvider as SqlPatOrdenTrabajoOperacionObservacionProvider;}
		}
		
		#endregion
		
		
		#region "PatOrdenTrabajoTransferenciaProvider"
			
		private SqlPatOrdenTrabajoTransferenciaProvider innerSqlPatOrdenTrabajoTransferenciaProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatOrdenTrabajoTransferencia"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatOrdenTrabajoTransferenciaProviderBase PatOrdenTrabajoTransferenciaProvider
		{
			get
			{
				if (innerSqlPatOrdenTrabajoTransferenciaProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatOrdenTrabajoTransferenciaProvider == null)
						{
							this.innerSqlPatOrdenTrabajoTransferenciaProvider = new SqlPatOrdenTrabajoTransferenciaProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatOrdenTrabajoTransferenciaProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatOrdenTrabajoTransferenciaProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatOrdenTrabajoTransferenciaProvider SqlPatOrdenTrabajoTransferenciaProvider
		{
			get {return PatOrdenTrabajoTransferenciaProvider as SqlPatOrdenTrabajoTransferenciaProvider;}
		}
		
		#endregion
		
		
		#region "PatEmpleadoProvider"
			
		private SqlPatEmpleadoProvider innerSqlPatEmpleadoProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatEmpleado"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatEmpleadoProviderBase PatEmpleadoProvider
		{
			get
			{
				if (innerSqlPatEmpleadoProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatEmpleadoProvider == null)
						{
							this.innerSqlPatEmpleadoProvider = new SqlPatEmpleadoProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatEmpleadoProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatEmpleadoProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatEmpleadoProvider SqlPatEmpleadoProvider
		{
			get {return PatEmpleadoProvider as SqlPatEmpleadoProvider;}
		}
		
		#endregion
		
		
		#region "PatMarcaVehiculoProvider"
			
		private SqlPatMarcaVehiculoProvider innerSqlPatMarcaVehiculoProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatMarcaVehiculo"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatMarcaVehiculoProviderBase PatMarcaVehiculoProvider
		{
			get
			{
				if (innerSqlPatMarcaVehiculoProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatMarcaVehiculoProvider == null)
						{
							this.innerSqlPatMarcaVehiculoProvider = new SqlPatMarcaVehiculoProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatMarcaVehiculoProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatMarcaVehiculoProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatMarcaVehiculoProvider SqlPatMarcaVehiculoProvider
		{
			get {return PatMarcaVehiculoProvider as SqlPatMarcaVehiculoProvider;}
		}
		
		#endregion
		
		
		#region "PatEmpresaProvider"
			
		private SqlPatEmpresaProvider innerSqlPatEmpresaProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatEmpresa"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatEmpresaProviderBase PatEmpresaProvider
		{
			get
			{
				if (innerSqlPatEmpresaProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatEmpresaProvider == null)
						{
							this.innerSqlPatEmpresaProvider = new SqlPatEmpresaProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatEmpresaProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatEmpresaProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatEmpresaProvider SqlPatEmpresaProvider
		{
			get {return PatEmpresaProvider as SqlPatEmpresaProvider;}
		}
		
		#endregion
		
		
		#region "PatDocumentoProvider"
			
		private SqlPatDocumentoProvider innerSqlPatDocumentoProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatDocumento"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatDocumentoProviderBase PatDocumentoProvider
		{
			get
			{
				if (innerSqlPatDocumentoProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatDocumentoProvider == null)
						{
							this.innerSqlPatDocumentoProvider = new SqlPatDocumentoProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatDocumentoProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatDocumentoProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatDocumentoProvider SqlPatDocumentoProvider
		{
			get {return PatDocumentoProvider as SqlPatDocumentoProvider;}
		}
		
		#endregion
		
		
		#region "PatEmpresaTallerProvider"
			
		private SqlPatEmpresaTallerProvider innerSqlPatEmpresaTallerProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatEmpresaTaller"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatEmpresaTallerProviderBase PatEmpresaTallerProvider
		{
			get
			{
				if (innerSqlPatEmpresaTallerProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatEmpresaTallerProvider == null)
						{
							this.innerSqlPatEmpresaTallerProvider = new SqlPatEmpresaTallerProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatEmpresaTallerProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatEmpresaTallerProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatEmpresaTallerProvider SqlPatEmpresaTallerProvider
		{
			get {return PatEmpresaTallerProvider as SqlPatEmpresaTallerProvider;}
		}
		
		#endregion
		
		
		#region "PatEstadoLiquidacionProvider"
			
		private SqlPatEstadoLiquidacionProvider innerSqlPatEstadoLiquidacionProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatEstadoLiquidacion"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatEstadoLiquidacionProviderBase PatEstadoLiquidacionProvider
		{
			get
			{
				if (innerSqlPatEstadoLiquidacionProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatEstadoLiquidacionProvider == null)
						{
							this.innerSqlPatEstadoLiquidacionProvider = new SqlPatEstadoLiquidacionProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatEstadoLiquidacionProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatEstadoLiquidacionProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatEstadoLiquidacionProvider SqlPatEstadoLiquidacionProvider
		{
			get {return PatEstadoLiquidacionProvider as SqlPatEstadoLiquidacionProvider;}
		}
		
		#endregion
		
		
		#region "PatEspecialidadMecanicoProvider"
			
		private SqlPatEspecialidadMecanicoProvider innerSqlPatEspecialidadMecanicoProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatEspecialidadMecanico"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatEspecialidadMecanicoProviderBase PatEspecialidadMecanicoProvider
		{
			get
			{
				if (innerSqlPatEspecialidadMecanicoProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatEspecialidadMecanicoProvider == null)
						{
							this.innerSqlPatEspecialidadMecanicoProvider = new SqlPatEspecialidadMecanicoProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatEspecialidadMecanicoProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatEspecialidadMecanicoProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatEspecialidadMecanicoProvider SqlPatEspecialidadMecanicoProvider
		{
			get {return PatEspecialidadMecanicoProvider as SqlPatEspecialidadMecanicoProvider;}
		}
		
		#endregion
		
		
		#region "PatConfiguracionTallerProvider"
			
		private SqlPatConfiguracionTallerProvider innerSqlPatConfiguracionTallerProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatConfiguracionTaller"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatConfiguracionTallerProviderBase PatConfiguracionTallerProvider
		{
			get
			{
				if (innerSqlPatConfiguracionTallerProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatConfiguracionTallerProvider == null)
						{
							this.innerSqlPatConfiguracionTallerProvider = new SqlPatConfiguracionTallerProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatConfiguracionTallerProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatConfiguracionTallerProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatConfiguracionTallerProvider SqlPatConfiguracionTallerProvider
		{
			get {return PatConfiguracionTallerProvider as SqlPatConfiguracionTallerProvider;}
		}
		
		#endregion
		
		
		#region "PatEstadoCitaProvider"
			
		private SqlPatEstadoCitaProvider innerSqlPatEstadoCitaProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatEstadoCita"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatEstadoCitaProviderBase PatEstadoCitaProvider
		{
			get
			{
				if (innerSqlPatEstadoCitaProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatEstadoCitaProvider == null)
						{
							this.innerSqlPatEstadoCitaProvider = new SqlPatEstadoCitaProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatEstadoCitaProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatEstadoCitaProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatEstadoCitaProvider SqlPatEstadoCitaProvider
		{
			get {return PatEstadoCitaProvider as SqlPatEstadoCitaProvider;}
		}
		
		#endregion
		
		
		#region "PatCargoOrdenProvider"
			
		private SqlPatCargoOrdenProvider innerSqlPatCargoOrdenProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatCargoOrden"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatCargoOrdenProviderBase PatCargoOrdenProvider
		{
			get
			{
				if (innerSqlPatCargoOrdenProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatCargoOrdenProvider == null)
						{
							this.innerSqlPatCargoOrdenProvider = new SqlPatCargoOrdenProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatCargoOrdenProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatCargoOrdenProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatCargoOrdenProvider SqlPatCargoOrdenProvider
		{
			get {return PatCargoOrdenProvider as SqlPatCargoOrdenProvider;}
		}
		
		#endregion
		
		
		#region "PatColorProvider"
			
		private SqlPatColorProvider innerSqlPatColorProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatColor"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatColorProviderBase PatColorProvider
		{
			get
			{
				if (innerSqlPatColorProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatColorProvider == null)
						{
							this.innerSqlPatColorProvider = new SqlPatColorProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatColorProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatColorProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatColorProvider SqlPatColorProvider
		{
			get {return PatColorProvider as SqlPatColorProvider;}
		}
		
		#endregion
		
		
		#region "PatCatalogoVehiculoProvider"
			
		private SqlPatCatalogoVehiculoProvider innerSqlPatCatalogoVehiculoProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatCatalogoVehiculo"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatCatalogoVehiculoProviderBase PatCatalogoVehiculoProvider
		{
			get
			{
				if (innerSqlPatCatalogoVehiculoProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatCatalogoVehiculoProvider == null)
						{
							this.innerSqlPatCatalogoVehiculoProvider = new SqlPatCatalogoVehiculoProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatCatalogoVehiculoProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatCatalogoVehiculoProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatCatalogoVehiculoProvider SqlPatCatalogoVehiculoProvider
		{
			get {return PatCatalogoVehiculoProvider as SqlPatCatalogoVehiculoProvider;}
		}
		
		#endregion
		
		
		#region "PatCapacidadTallerProvider"
			
		private SqlPatCapacidadTallerProvider innerSqlPatCapacidadTallerProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatCapacidadTaller"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatCapacidadTallerProviderBase PatCapacidadTallerProvider
		{
			get
			{
				if (innerSqlPatCapacidadTallerProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatCapacidadTallerProvider == null)
						{
							this.innerSqlPatCapacidadTallerProvider = new SqlPatCapacidadTallerProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatCapacidadTallerProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatCapacidadTallerProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatCapacidadTallerProvider SqlPatCapacidadTallerProvider
		{
			get {return PatCapacidadTallerProvider as SqlPatCapacidadTallerProvider;}
		}
		
		#endregion
		
		
		#region "PatCausalGarantiaProvider"
			
		private SqlPatCausalGarantiaProvider innerSqlPatCausalGarantiaProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatCausalGarantia"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatCausalGarantiaProviderBase PatCausalGarantiaProvider
		{
			get
			{
				if (innerSqlPatCausalGarantiaProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatCausalGarantiaProvider == null)
						{
							this.innerSqlPatCausalGarantiaProvider = new SqlPatCausalGarantiaProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatCausalGarantiaProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatCausalGarantiaProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatCausalGarantiaProvider SqlPatCausalGarantiaProvider
		{
			get {return PatCausalGarantiaProvider as SqlPatCausalGarantiaProvider;}
		}
		
		#endregion
		
		
		#region "PatClienteProvider"
			
		private SqlPatClienteProvider innerSqlPatClienteProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatCliente"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatClienteProviderBase PatClienteProvider
		{
			get
			{
				if (innerSqlPatClienteProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatClienteProvider == null)
						{
							this.innerSqlPatClienteProvider = new SqlPatClienteProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatClienteProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatClienteProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatClienteProvider SqlPatClienteProvider
		{
			get {return PatClienteProvider as SqlPatClienteProvider;}
		}
		
		#endregion
		
		
		#region "PatClaseVehiculoProvider"
			
		private SqlPatClaseVehiculoProvider innerSqlPatClaseVehiculoProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatClaseVehiculo"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatClaseVehiculoProviderBase PatClaseVehiculoProvider
		{
			get
			{
				if (innerSqlPatClaseVehiculoProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatClaseVehiculoProvider == null)
						{
							this.innerSqlPatClaseVehiculoProvider = new SqlPatClaseVehiculoProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatClaseVehiculoProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatClaseVehiculoProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatClaseVehiculoProvider SqlPatClaseVehiculoProvider
		{
			get {return PatClaseVehiculoProvider as SqlPatClaseVehiculoProvider;}
		}
		
		#endregion
		
		
		#region "PatCitaTallerProvider"
			
		private SqlPatCitaTallerProvider innerSqlPatCitaTallerProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatCitaTaller"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatCitaTallerProviderBase PatCitaTallerProvider
		{
			get
			{
				if (innerSqlPatCitaTallerProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatCitaTallerProvider == null)
						{
							this.innerSqlPatCitaTallerProvider = new SqlPatCitaTallerProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatCitaTallerProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatCitaTallerProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatCitaTallerProvider SqlPatCitaTallerProvider
		{
			get {return PatCitaTallerProvider as SqlPatCitaTallerProvider;}
		}
		
		#endregion
		
		
		#region "PatEstadoOperacionProvider"
			
		private SqlPatEstadoOperacionProvider innerSqlPatEstadoOperacionProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatEstadoOperacion"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatEstadoOperacionProviderBase PatEstadoOperacionProvider
		{
			get
			{
				if (innerSqlPatEstadoOperacionProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatEstadoOperacionProvider == null)
						{
							this.innerSqlPatEstadoOperacionProvider = new SqlPatEstadoOperacionProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatEstadoOperacionProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatEstadoOperacionProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatEstadoOperacionProvider SqlPatEstadoOperacionProvider
		{
			get {return PatEstadoOperacionProvider as SqlPatEstadoOperacionProvider;}
		}
		
		#endregion
		
		
		#region "PatItemListaPreciosProvider"
			
		private SqlPatItemListaPreciosProvider innerSqlPatItemListaPreciosProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatItemListaPrecios"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatItemListaPreciosProviderBase PatItemListaPreciosProvider
		{
			get
			{
				if (innerSqlPatItemListaPreciosProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatItemListaPreciosProvider == null)
						{
							this.innerSqlPatItemListaPreciosProvider = new SqlPatItemListaPreciosProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatItemListaPreciosProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatItemListaPreciosProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatItemListaPreciosProvider SqlPatItemListaPreciosProvider
		{
			get {return PatItemListaPreciosProvider as SqlPatItemListaPreciosProvider;}
		}
		
		#endregion
		
		
		#region "PatEstadoOrdenProvider"
			
		private SqlPatEstadoOrdenProvider innerSqlPatEstadoOrdenProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatEstadoOrden"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatEstadoOrdenProviderBase PatEstadoOrdenProvider
		{
			get
			{
				if (innerSqlPatEstadoOrdenProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatEstadoOrdenProvider == null)
						{
							this.innerSqlPatEstadoOrdenProvider = new SqlPatEstadoOrdenProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatEstadoOrdenProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatEstadoOrdenProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatEstadoOrdenProvider SqlPatEstadoOrdenProvider
		{
			get {return PatEstadoOrdenProvider as SqlPatEstadoOrdenProvider;}
		}
		
		#endregion
		
		
		#region "PatItemOperacionProvider"
			
		private SqlPatItemOperacionProvider innerSqlPatItemOperacionProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatItemOperacion"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatItemOperacionProviderBase PatItemOperacionProvider
		{
			get
			{
				if (innerSqlPatItemOperacionProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatItemOperacionProvider == null)
						{
							this.innerSqlPatItemOperacionProvider = new SqlPatItemOperacionProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatItemOperacionProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatItemOperacionProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatItemOperacionProvider SqlPatItemOperacionProvider
		{
			get {return PatItemOperacionProvider as SqlPatItemOperacionProvider;}
		}
		
		#endregion
		
		
		#region "PatItemInventarioListaPreciosProvider"
			
		private SqlPatItemInventarioListaPreciosProvider innerSqlPatItemInventarioListaPreciosProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatItemInventarioListaPrecios"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatItemInventarioListaPreciosProviderBase PatItemInventarioListaPreciosProvider
		{
			get
			{
				if (innerSqlPatItemInventarioListaPreciosProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatItemInventarioListaPreciosProvider == null)
						{
							this.innerSqlPatItemInventarioListaPreciosProvider = new SqlPatItemInventarioListaPreciosProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatItemInventarioListaPreciosProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatItemInventarioListaPreciosProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatItemInventarioListaPreciosProvider SqlPatItemInventarioListaPreciosProvider
		{
			get {return PatItemInventarioListaPreciosProvider as SqlPatItemInventarioListaPreciosProvider;}
		}
		
		#endregion
		
		
		#region "PatItemPeritajeProvider"
			
		private SqlPatItemPeritajeProvider innerSqlPatItemPeritajeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatItemPeritaje"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatItemPeritajeProviderBase PatItemPeritajeProvider
		{
			get
			{
				if (innerSqlPatItemPeritajeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatItemPeritajeProvider == null)
						{
							this.innerSqlPatItemPeritajeProvider = new SqlPatItemPeritajeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatItemPeritajeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatItemPeritajeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatItemPeritajeProvider SqlPatItemPeritajeProvider
		{
			get {return PatItemPeritajeProvider as SqlPatItemPeritajeProvider;}
		}
		
		#endregion
		
		
		#region "PatMantenimientoProgramadoProvider"
			
		private SqlPatMantenimientoProgramadoProvider innerSqlPatMantenimientoProgramadoProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatMantenimientoProgramado"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatMantenimientoProgramadoProviderBase PatMantenimientoProgramadoProvider
		{
			get
			{
				if (innerSqlPatMantenimientoProgramadoProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatMantenimientoProgramadoProvider == null)
						{
							this.innerSqlPatMantenimientoProgramadoProvider = new SqlPatMantenimientoProgramadoProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatMantenimientoProgramadoProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatMantenimientoProgramadoProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatMantenimientoProgramadoProvider SqlPatMantenimientoProgramadoProvider
		{
			get {return PatMantenimientoProgramadoProvider as SqlPatMantenimientoProgramadoProvider;}
		}
		
		#endregion
		
		
		#region "PatKitItemProvider"
			
		private SqlPatKitItemProvider innerSqlPatKitItemProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatKitItem"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatKitItemProviderBase PatKitItemProvider
		{
			get
			{
				if (innerSqlPatKitItemProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatKitItemProvider == null)
						{
							this.innerSqlPatKitItemProvider = new SqlPatKitItemProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatKitItemProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatKitItemProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatKitItemProvider SqlPatKitItemProvider
		{
			get {return PatKitItemProvider as SqlPatKitItemProvider;}
		}
		
		#endregion
		
		
		#region "PatItemInventarioProvider"
			
		private SqlPatItemInventarioProvider innerSqlPatItemInventarioProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatItemInventario"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatItemInventarioProviderBase PatItemInventarioProvider
		{
			get
			{
				if (innerSqlPatItemInventarioProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatItemInventarioProvider == null)
						{
							this.innerSqlPatItemInventarioProvider = new SqlPatItemInventarioProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatItemInventarioProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatItemInventarioProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatItemInventarioProvider SqlPatItemInventarioProvider
		{
			get {return PatItemInventarioProvider as SqlPatItemInventarioProvider;}
		}
		
		#endregion
		
		
		#region "PatKitOperacionProvider"
			
		private SqlPatKitOperacionProvider innerSqlPatKitOperacionProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatKitOperacion"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatKitOperacionProviderBase PatKitOperacionProvider
		{
			get
			{
				if (innerSqlPatKitOperacionProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatKitOperacionProvider == null)
						{
							this.innerSqlPatKitOperacionProvider = new SqlPatKitOperacionProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatKitOperacionProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatKitOperacionProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatKitOperacionProvider SqlPatKitOperacionProvider
		{
			get {return PatKitOperacionProvider as SqlPatKitOperacionProvider;}
		}
		
		#endregion
		
		
		#region "PatHistoricEntityProvider"
			
		private SqlPatHistoricEntityProvider innerSqlPatHistoricEntityProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatHistoricEntity"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatHistoricEntityProviderBase PatHistoricEntityProvider
		{
			get
			{
				if (innerSqlPatHistoricEntityProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatHistoricEntityProvider == null)
						{
							this.innerSqlPatHistoricEntityProvider = new SqlPatHistoricEntityProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatHistoricEntityProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatHistoricEntityProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatHistoricEntityProvider SqlPatHistoricEntityProvider
		{
			get {return PatHistoricEntityProvider as SqlPatHistoricEntityProvider;}
		}
		
		#endregion
		
		
		#region "PatItemGrupoProvider"
			
		private SqlPatItemGrupoProvider innerSqlPatItemGrupoProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatItemGrupo"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatItemGrupoProviderBase PatItemGrupoProvider
		{
			get
			{
				if (innerSqlPatItemGrupoProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatItemGrupoProvider == null)
						{
							this.innerSqlPatItemGrupoProvider = new SqlPatItemGrupoProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatItemGrupoProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatItemGrupoProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatItemGrupoProvider SqlPatItemGrupoProvider
		{
			get {return PatItemGrupoProvider as SqlPatItemGrupoProvider;}
		}
		
		#endregion
		
		
		#region "PatEstadoPeritajeProvider"
			
		private SqlPatEstadoPeritajeProvider innerSqlPatEstadoPeritajeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatEstadoPeritaje"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatEstadoPeritajeProviderBase PatEstadoPeritajeProvider
		{
			get
			{
				if (innerSqlPatEstadoPeritajeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatEstadoPeritajeProvider == null)
						{
							this.innerSqlPatEstadoPeritajeProvider = new SqlPatEstadoPeritajeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatEstadoPeritajeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatEstadoPeritajeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatEstadoPeritajeProvider SqlPatEstadoPeritajeProvider
		{
			get {return PatEstadoPeritajeProvider as SqlPatEstadoPeritajeProvider;}
		}
		
		#endregion
		
		
		#region "PatHistoricAttributeByEntityProvider"
			
		private SqlPatHistoricAttributeByEntityProvider innerSqlPatHistoricAttributeByEntityProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatHistoricAttributeByEntity"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatHistoricAttributeByEntityProviderBase PatHistoricAttributeByEntityProvider
		{
			get
			{
				if (innerSqlPatHistoricAttributeByEntityProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatHistoricAttributeByEntityProvider == null)
						{
							this.innerSqlPatHistoricAttributeByEntityProvider = new SqlPatHistoricAttributeByEntityProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatHistoricAttributeByEntityProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatHistoricAttributeByEntityProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatHistoricAttributeByEntityProvider SqlPatHistoricAttributeByEntityProvider
		{
			get {return PatHistoricAttributeByEntityProvider as SqlPatHistoricAttributeByEntityProvider;}
		}
		
		#endregion
		
		
		#region "PatGamaVehiculoProvider"
			
		private SqlPatGamaVehiculoProvider innerSqlPatGamaVehiculoProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatGamaVehiculo"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatGamaVehiculoProviderBase PatGamaVehiculoProvider
		{
			get
			{
				if (innerSqlPatGamaVehiculoProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatGamaVehiculoProvider == null)
						{
							this.innerSqlPatGamaVehiculoProvider = new SqlPatGamaVehiculoProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatGamaVehiculoProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatGamaVehiculoProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatGamaVehiculoProvider SqlPatGamaVehiculoProvider
		{
			get {return PatGamaVehiculoProvider as SqlPatGamaVehiculoProvider;}
		}
		
		#endregion
		
		
		#region "PatGrupoPeritajeProvider"
			
		private SqlPatGrupoPeritajeProvider innerSqlPatGrupoPeritajeProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatGrupoPeritaje"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatGrupoPeritajeProviderBase PatGrupoPeritajeProvider
		{
			get
			{
				if (innerSqlPatGrupoPeritajeProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatGrupoPeritajeProvider == null)
						{
							this.innerSqlPatGrupoPeritajeProvider = new SqlPatGrupoPeritajeProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatGrupoPeritajeProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatGrupoPeritajeProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatGrupoPeritajeProvider SqlPatGrupoPeritajeProvider
		{
			get {return PatGrupoPeritajeProvider as SqlPatGrupoPeritajeProvider;}
		}
		
		#endregion
		
		
		#region "PatHistoricProvider"
			
		private SqlPatHistoricProvider innerSqlPatHistoricProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatHistoric"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatHistoricProviderBase PatHistoricProvider
		{
			get
			{
				if (innerSqlPatHistoricProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatHistoricProvider == null)
						{
							this.innerSqlPatHistoricProvider = new SqlPatHistoricProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatHistoricProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatHistoricProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatHistoricProvider SqlPatHistoricProvider
		{
			get {return PatHistoricProvider as SqlPatHistoricProvider;}
		}
		
		#endregion
		
		
		#region "PatItemCatalogoProvider"
			
		private SqlPatItemCatalogoProvider innerSqlPatItemCatalogoProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatItemCatalogo"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatItemCatalogoProviderBase PatItemCatalogoProvider
		{
			get
			{
				if (innerSqlPatItemCatalogoProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatItemCatalogoProvider == null)
						{
							this.innerSqlPatItemCatalogoProvider = new SqlPatItemCatalogoProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatItemCatalogoProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatItemCatalogoProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatItemCatalogoProvider SqlPatItemCatalogoProvider
		{
			get {return PatItemCatalogoProvider as SqlPatItemCatalogoProvider;}
		}
		
		#endregion
		
		
		#region "PatVehiculoProvider"
			
		private SqlPatVehiculoProvider innerSqlPatVehiculoProvider;

		///<summary>
		/// This class is the Data Access Logic Component for the <see cref="PatVehiculo"/> business entity.
		/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
		///</summary>
		/// <value></value>
		public override PatVehiculoProviderBase PatVehiculoProvider
		{
			get
			{
				if (innerSqlPatVehiculoProvider == null) 
				{
					lock (syncRoot) 
					{
						if (innerSqlPatVehiculoProvider == null)
						{
							this.innerSqlPatVehiculoProvider = new SqlPatVehiculoProvider(_connectionString, _useStoredProcedure, _providerInvariantName);
						}
					}
				}
				return innerSqlPatVehiculoProvider;
			}
		}
		
		/// <summary>
		/// Gets the current <c cref="SqlPatVehiculoProvider"/>.
		/// </summary>
		/// <value></value>
		public SqlPatVehiculoProvider SqlPatVehiculoProvider
		{
			get {return PatVehiculoProvider as SqlPatVehiculoProvider;}
		}
		
		#endregion
		
		
		
		#region "General data access methods"

		#region "ExecuteNonQuery"
		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public override int ExecuteNonQuery(string storedProcedureName, params object[] parameterValues)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);
			return database.ExecuteNonQuery(storedProcedureName, parameterValues);	
		}

		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public override int ExecuteNonQuery(TransactionManager transactionManager, string storedProcedureName, params object[] parameterValues)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);
			return database.ExecuteNonQuery(transactionManager.TransactionObject, storedProcedureName, parameterValues);	
		}

		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="commandWrapper">The command wrapper.</param>
		public override void ExecuteNonQuery(DbCommand commandWrapper)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);
			database.ExecuteNonQuery(commandWrapper);	
			
		}

		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandWrapper">The command wrapper.</param>
		public override void ExecuteNonQuery(TransactionManager transactionManager, DbCommand commandWrapper)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);
			database.ExecuteNonQuery(commandWrapper, transactionManager.TransactionObject);	
		}


		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public override int ExecuteNonQuery(CommandType commandType, string commandText)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);
			return database.ExecuteNonQuery(commandType, commandText);	
		}
		/// <summary>
		/// Executes the non query.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public override int ExecuteNonQuery(TransactionManager transactionManager, CommandType commandType, string commandText)
		{
			Database database = transactionManager.Database;			
			return database.ExecuteNonQuery(transactionManager.TransactionObject , commandType, commandText);				
		}
		#endregion

		#region "ExecuteDataReader"
		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public override IDataReader ExecuteReader(string storedProcedureName, params object[] parameterValues)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);			
			return database.ExecuteReader(storedProcedureName, parameterValues);	
		}

		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public override IDataReader ExecuteReader(TransactionManager transactionManager, string storedProcedureName, params object[] parameterValues)
		{
			Database database = transactionManager.Database;
			return database.ExecuteReader(transactionManager.TransactionObject, storedProcedureName, parameterValues);	
		}

		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public override IDataReader ExecuteReader(DbCommand commandWrapper)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);			
			return database.ExecuteReader(commandWrapper);	
		}

		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public override IDataReader ExecuteReader(TransactionManager transactionManager, DbCommand commandWrapper)
		{
			Database database = transactionManager.Database;
			return database.ExecuteReader(commandWrapper, transactionManager.TransactionObject);	
		}


		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public override IDataReader ExecuteReader(CommandType commandType, string commandText)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);
			return database.ExecuteReader(commandType, commandText);	
		}
		/// <summary>
		/// Executes the reader.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public override IDataReader ExecuteReader(TransactionManager transactionManager, CommandType commandType, string commandText)
		{
			Database database = transactionManager.Database;			
			return database.ExecuteReader(transactionManager.TransactionObject , commandType, commandText);				
		}
		#endregion

		#region "ExecuteDataSet"
		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public override DataSet ExecuteDataSet(string storedProcedureName, params object[] parameterValues)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);			
			return database.ExecuteDataSet(storedProcedureName, parameterValues);	
		}

		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public override DataSet ExecuteDataSet(TransactionManager transactionManager, string storedProcedureName, params object[] parameterValues)
		{
			Database database = transactionManager.Database;
			return database.ExecuteDataSet(transactionManager.TransactionObject, storedProcedureName, parameterValues);	
		}

		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public override DataSet ExecuteDataSet(DbCommand commandWrapper)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);			
			return database.ExecuteDataSet(commandWrapper);	
		}

		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public override DataSet ExecuteDataSet(TransactionManager transactionManager, DbCommand commandWrapper)
		{
			Database database = transactionManager.Database;
			return database.ExecuteDataSet(commandWrapper, transactionManager.TransactionObject);	
		}


		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public override DataSet ExecuteDataSet(CommandType commandType, string commandText)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);
			return database.ExecuteDataSet(commandType, commandText);	
		}
		/// <summary>
		/// Executes the data set.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public override DataSet ExecuteDataSet(TransactionManager transactionManager, CommandType commandType, string commandText)
		{
			Database database = transactionManager.Database;			
			return database.ExecuteDataSet(transactionManager.TransactionObject , commandType, commandText);				
		}
		#endregion

		#region "ExecuteScalar"
		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public override object ExecuteScalar(string storedProcedureName, params object[] parameterValues)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);			
			return database.ExecuteScalar(storedProcedureName, parameterValues);	
		}

		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="storedProcedureName">Name of the stored procedure.</param>
		/// <param name="parameterValues">The parameter values.</param>
		/// <returns></returns>
		public override object ExecuteScalar(TransactionManager transactionManager, string storedProcedureName, params object[] parameterValues)
		{
			Database database = transactionManager.Database;
			return database.ExecuteScalar(transactionManager.TransactionObject, storedProcedureName, parameterValues);	
		}

		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public override object ExecuteScalar(DbCommand commandWrapper)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);			
			return database.ExecuteScalar(commandWrapper);	
		}

		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandWrapper">The command wrapper.</param>
		/// <returns></returns>
		public override object ExecuteScalar(TransactionManager transactionManager, DbCommand commandWrapper)
		{
			Database database = transactionManager.Database;
			return database.ExecuteScalar(commandWrapper, transactionManager.TransactionObject);	
		}

		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public override object ExecuteScalar(CommandType commandType, string commandText)
		{
			SqlDatabase database = new SqlDatabase(this._connectionString);
			return database.ExecuteScalar(commandType, commandText);	
		}
		/// <summary>
		/// Executes the scalar.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="commandType">Type of the command.</param>
		/// <param name="commandText">The command text.</param>
		/// <returns></returns>
		public override object ExecuteScalar(TransactionManager transactionManager, CommandType commandType, string commandText)
		{
			Database database = transactionManager.Database;			
			return database.ExecuteScalar(transactionManager.TransactionObject , commandType, commandText);				
		}
		#endregion

		#endregion


	}
}
